home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
TCL1
/
CDICTION
/
CSMARTWI.H
< prev
next >
Wrap
Text File
|
1989-09-15
|
2KB
|
66 lines
/*****************************************************************************
CSmartWindow: subclass of CWindow that adds some additional features:
These are:
Ñ Transparent support for color. When color QD is present a color
window is automatically created. Since it calls GetNewCWindow
then it will also have a pallete if one was defined. If none
was defined then 'pltt' 0 is loaded and SetPalette called.
Ñ Support for modal windows. CSmartDesktop and CSmartBartender
is also required. Call BeModal() to make a window modal and
ReleaseMode() to cancel it.
Ñ Support for its own text environment (font, size, style).
This allows you to have subviews that rely on the window
to provide the desired font, rather than each subview having
to carry its own environment. The font family is initialized
by calling GetPreferredFontNum(), Which gets the preferred
font family from an (optional) 'STR ' ID 1002.
by Dan Podwall - you may do anything you please with this code except
charge for it, with the exception of normal network download charges.
*****************************************************************************/
#define _H_CSmartWindow
#include "CWindow.h"
#include "defs.h"
struct CSmartWindow : CWindow
{
/* instance variables */
struct CTextEnvirons *itsEnvirons;
Boolean isModal;
/* public methods */
virtual void ISmartWindow(Int16 WINDid, Boolean aFloating,
CView *anEnclosure, CBureaucrat *aSupervisor,
Boolean sizeIsMax);
virtual void Prepare();
virtual void RestoreEnvirons( void);
virtual void SetFontNumber(Int16 aFontNumber);
virtual void SetFontName(Str255 aFontName);
virtual void SetFontStyle(Int16 aStyle);
virtual void SetFontSize(Int16 aSize);
virtual void SetTextMode(Int16 aMode);
virtual void BeModal( void);
virtual void ReleaseMode( void);
virtual Boolean IsModal( void);
virtual void Dispose( void);
/* private methods */
virtual void MakeMacWindow(Int16 WINDid);
virtual void ChangeSize(Int16 width, Int16 height);
};